<?php
/**
 * Created By base
 * Author: Virus
 * Date: 2020/3/11
 * Time: 18:52
 */

namespace app\common\model\mysql;


class ErrorLog extends BaseModel
{
    public function getLogTimeAttr($value)
    {
        return date('Y-m-d H:i:s', $value);
    }

    public function addData($data = [])
    {
        if (empty($data) || !is_array($data)) {
            throw new \think\Exception("数据不能为空，并且是数组类型");
        }

        return $this->insert($data, 0, 1);
    }
}